package message
type MarkdownBody struct {
	Content             string   `json:"content"`
	MentionedIdList     []string `json:"mentioned_list"`
	MentionedMobileList []string `json:"mentioned_mobile_list"`
}

type Markdown struct {
	Message
	MarkdownBody *MarkdownBody `json:"markdown"`
}

func NewMarkdown() *Markdown {
	m := &Markdown{}
	m.setType("markdown")
	return m
}

// 消息内容
func (m *Markdown) SetContent(content string) *Markdown {
	if m.MarkdownBody == nil {
		m.setDefaultTextBody()
	}
	m.MarkdownBody.Content = content

	return m
}
// 默认消息
func (m *Markdown) setDefaultTextBody() *Markdown {
	m.MarkdownBody = &MarkdownBody{}
	return m
}

// @id
func (m *Markdown) SetMentionedIds(ids []string) *Markdown {
	m.MarkdownBody.MentionedIdList = ids

	return m
}

// @mobile
func (m *Markdown) SetMentionedMobiles(mobiles []string) *Markdown {
	m.MarkdownBody.MentionedMobileList = mobiles
	return m
}